﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Net;

namespace Argos.Windows.Forms
{
	public partial class NetworkCredentialDialog: Form
	{
		public NetworkCredentialDialog()
		{
			InitializeComponent();
		}

		public NetworkCredential SelectedCredentials
		{
			get
			{
				return new NetworkCredential(this.UserNameTextbox.Text, this.PasswordTextbox.Text, this.DomainTextbox.Text);
			}
			set
			{
				this.DomainTextbox.Text = value.Domain;
				this.UserNameTextbox.Text = value.UserName;
				this.PasswordTextbox.Text = value.Password;
			}
		}

		private void OK_Click(object sender, EventArgs e)
		{
			this.DialogResult = DialogResult.OK;
			this.Close();
		}

	}
}
